Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A better solution to fix incorrect axis data in Chord #433

Merged
merged 1 commit into from
Dec 29, 2023
Merged

A better solution to fix incorrect axis data in Chord #433

merged 1 commit into from
Dec 29, 2023

Conversation

Shute052
Copy link
Collaborator

@Shute052 Shute052 commented Dec 29, 2023

Previously, I missed checking where the InputStream::input_axis_pair() function was used, got a bit worried that it might be widely used. However, upon investigation, it seems it’s just handling this way for Chords—my bad! This made the solution more complex. So, I undid #432 (what I did earlier) and fixed up #430 again.

Fixing this problem should mainly involve checking if all buttons declared in the Chord are pressed. This simpler solution (compared to the unchanged) uses a for-loop that breaks out early. Perhaps it could potentially improve performance by avoiding redundant calculations to get the first dual axis data?

@alice-i-cecile alice-i-cecile marked this pull request as ready for review December 29, 2023 20:41
@alice-i-cecile alice-i-cecile merged commit 135fb47 into Leafwing-Studios:main Dec 29, 2023
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants